home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / pluginy Firefox / 6984 / 6984.xpi / chrome / lazarus.jar / content / generate-keys.js < prev    next >
Text File  |  2009-11-24  |  922b  |  36 lines

  1.  
  2.  
  3. Lazarus.db = Lazarus.getBrowser().Lazarus.db;
  4. Lazarus.Crypto = Lazarus.getBrowser().Lazarus.Crypto;
  5.  
  6. /**
  7. */
  8. function onAccept(){
  9.     
  10.     //and dont let them cancel it 
  11.     //document.getElementById('').disabled = true;    
  12.     if (Lazarus.getBrowser().Lazarus.enterMasterPassword()){  
  13.         //okey dokey, lets do it.
  14.         //better tell the user that this might take a while
  15.         document.getElementById('generate-keys-progress').style.visibility = "visible";
  16.         document.getElementById('generate-keys-text').style.visibility = "visible";
  17.         Lazarus.getBrowser().Lazarus.generateEncryptionKeys();
  18.         alert(strings['keys-generated']);
  19.         //and we're done
  20.         return true;
  21.     }
  22.     else {
  23.         alert(strings['password-not-entered']);
  24.         return false;
  25.     }
  26. }
  27.  
  28.  
  29. /**
  30. */
  31. function onCancel(){
  32.     alert(strings['key-generation-cancelled']);
  33. }
  34.